package com.story.modular.app.warpper;

import com.story.common.constant.factory.ConstantFactory;
import com.story.core.base.warpper.BaseControllerWarpper;
import com.story.core.util.ToolUtil;

import java.util.Map;

/**
 * @author Administrator
 * @decription
 * @Date 2017-12-19 15:53
 */
public class BannerWarpper extends BaseControllerWarpper {

    public BannerWarpper(Object list) {
        super(list);
    }

    @Override
    public void warpTheMap(Map<String, Object> map) {

        Integer id = (Integer) map.get("id");

        if (ToolUtil.isEmpty(id) || id.equals(0)) {
            map.put("bName", "--");
        } else {
            map.put("bName", ConstantFactory.me().getBannerName(id));
        }
    }
}
